<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--bootstrap插件-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="/static/plugin/bootstrap/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="/static/plugin/jo/joUI.css" rel="stylesheet"/>
    <!--字体插件-->
    <link href="/static/plugin/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="/static/plugin/layui-2.4.3/css/layui.css" rel="stylesheet"/>
    <!--ztree-->
    <link href="/static/plugin/zTree/css/metroStyle/metroStyle.css" rel="stylesheet"/>
    <!--common-->
    <link href="/static/css/common.css" rel="stylesheet"/>
    <title>企业监测指标结果表单</title>
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <!--按钮栏-->
            <div class="form-group button-bar button-bar">
                <!--按钮占位符.加载到的按钮会渲染到占位符里面-->
                <span class="young-button-placeholder" navigateId="QYJC_FORM_BUTTON"></span>
            </div>
            <!--按钮栏-->
        </div>
    </div>
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <form id="pageForm" name="pageForm" action="" method="post">
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">样品编码</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" id="sampleNumber"  name="sampleNumber" value="" class="form-control "  ErrEmpty="样品编码不允许为空" />
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">指标类型</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <select   name="indicatorType" id="indicatorType" class="joSelect form-control" data='' firstItem='{"indicatorId":"","indicatorsName":""}'
                                 dataurl="" keyfield="indicatorId" valuefield="indicatorsName"></select>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">指标</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <select  name="indicators" id="indicatorName" class="joSelect form-control" data='' firstItem='{"indicatorId":"","indicatorsName":""}' dataurl="" keyfield="indicatorId" valuefield="indicatorsName"></select>
                    </div>
                </div>
                <div class="young-form-item col-md-6 " id="xzqh">
                    <div class="young-form-label">行政区划</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <div class="form-group" style="float: left">
                            <label class="control-label" style="float: left">省：&nbsp;</label>
                            <select style="width: 120px" name="province" id="provinceCode"
                                    class="joSelect form-control" data=''
                                    firstItem='{"id":"","name":""}'
                                    dataurl="" keyfield="id" valuefield="name">
                            </select>
                        </div>
                        <div class="form-group" style="float: left">
                            <label class="control-label" style="float: left">市：&nbsp;</label>
                            <select style="width: 120px" name="city" id="cityCode" class="joSelect form-control"
                                    data=''
                                    firstItem='{"id":"","name":""}' dataurl="" keyfield="id" valuefield="name">
                            </select>
                        </div>
                        <div class="form-group" style="float: left">
                            <label class="control-label" style="float: left">县：&nbsp;</label>
                            <select style="width: 120px" name="county" id="countyCode" class="joSelect form-control"
                                    data=''
                                    firstItem='{"id":"","name":""}' dataurl="" keyfield="id" valuefield="name">
                            </select>
                        </div>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">检测值</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="detectValues" value="" class="form-control "  ErrEmpty="检测值不允许为空" />
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">检测单位</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="detectCompany" value="" class="form-control "  ErrEmpty="检测单位不允许为空" />
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">检测方法</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="detectMethod" value="" class="form-control "  ErrEmpty="检测方法不允许为空" />
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">指标备注</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="detectRemarks" value="" class="form-control "  ErrEmpty="指标备注不允许为空" />
                    </div>
                </div>

                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">环境质量等级</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="levels" value="" class="form-control "  ErrEmpty="环境质量等级不允许为空" />
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">单位</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="unit" value="" class="form-control "  ErrEmpty="单位不允许为空" />
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">检测时间</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" id="detectTimes" value="" name="detectTimes" class="form-control "   />
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">环境质量备注</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="qualityremarks" value="" class="form-control "  ErrEmpty="环境质量备注不允许为空" />
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">锁定</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <!-- <input type="text"   name="detectUnlack" value="" class="form-control "  ErrNumber="锁定需填写数字类型" />-->
                        <select style="width: 100px" name="detectUnlack" value="" class="form-control" ErrNumber="锁定不允许为空">
                            <option value="0">未锁定</option>
                            <option value="1">已锁定</option>
                        </select>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<!--配置信息-->
<script src="/static/js/config.js"></script>
<!--jquery-->
<script src="/static/plugin/jquery/jquery-3.3.1.js"></script>
<script src="/static/plugin/jquery/jquery.cookie.js"></script>
<!--bootstrap-->
<script src="/static/plugin/bootstrap/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="/static/plugin/other/html5shiv.js"></script>
<script src="/static/plugin/other/respond.min.js"></script>
<![endif]-->
<!--layui-->
<script src="/static/plugin/layui-2.4.3/layui.all.js"></script>
<!--ztree-->
<script src="/static/plugin/zTree/js/jquery.ztree.all.js"></script>
<!--common-->
<script src="/static/js/common.js"></script>
<!--jo-->
<script src="/static/plugin/jo/jo.js"></script>
<script src="/static/plugin/jo/jo-adapt.js"></script>
<script src="/static/plugin/jo/jo-page-view.js"></script>
<script src="/static/plugin/jo/jo-page-form.js"></script>
<script src="/static/plugin/jo/jo-listener.js"></script>
<script type="text/javascript">
    layui.laydate.render({
        elem: '#detectTimes' //注册日期控件
    });
    $(function(){
        var jParams = {
            "PKName" : "id",//主键属性名
            "saveAfter" : "toEdit",
            "addUrl" : "/nyd/enterpriseMonitoringindex/insert",//新增
            "deleteUrl" : "/nyd/enterpriseMonitoringindex/delete",//删除
            "updateUrl" : "/nyd/enterpriseMonitoringindex/update",//修改
            "formDataUrl" : "/nyd/enterpriseMonitoringindex/get",//查询
            //"readonly2Label" : true //只读转文本
        };
        initIndicator('indicatorType','indicatorName');
        joForm.initFormPage(jParams);//初始化
        initButton();
    });
    //初始化新增页面回调函数(在初始化按钮前发生)
    joForm.initFormPageOfAdd = function(){
        //初始化省市县联动

        $("#sampleNumber").val(jo.getUrlParam("sampleNumber"));
        $("#enterpriseId").val(jo.getUrlParam("enterpriseId"));
    };
    //初始化表单值前处理
    joForm.initFormValueBefore = function(oJson){
        if (joForm.isAdd) {

        } else {
            $("#xzqh").hide();
        }
        initIndicator('indicatorType','indicatorName',joForm.formData.indicatorType,joForm.formData.indicators);
        oJson.detectTimes = jo.formatDate(oJson.detectTimes);
    };
    //初始化表单值后处理
    joForm.initFormValueAfter = function(oJson){

    };
    //新增请求提交前回调函数
    joForm.dealDataAtSaveBefore = function(oJson){

    };
    //修改请求提交前回调函数
    joForm.dealDataAtUpdateBefore = function(oJson){

    };
    /* 关于joForm更多回调函数和配置参数可查看jo-page-form.js */
</script>
</body>
</html>
